package com.ScoresSystem.mapper;

import com.ScoresSystem.pojo.Teacher;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TeacherMapper {
    List<Teacher> findAllTeachers();

    Teacher findTeacherById(int id);

    // 新增教师信息
    int addTeacher(Teacher teacher);

    // 删除教师信息
    int deleteTeacher(int id);

    // 更新教师信息
    int updateTeacher(Teacher teacher);

    // 登录
    Teacher login(@Param("tname") String tname, @Param("tpassword") String tpassword);

    Teacher findTeacher(@Param("tname") String nowUserName, @Param("tpassword") String oldPassword);

    int updatePassword(@Param("tname") String nowUserName, @Param("tpassword") String newPassword);
}
